//
//  ForgetPwdViewModel.m
//  MoXiProject
//
//  Created by 周筱雯 on 2017/6/30.
//  Copyright © 2017年 周筱雯. All rights reserved.
//

#import "ForgetPwdViewModel.h"

@implementation ForgetPwdViewModel

-(RACSignal *)forgetPwdRequestParameter:(NSString *)phone password:(NSString *)pwd code:(NSString *)code strTime:(NSString *)time{

    return [RACSignal createSignal:^RACDisposable *(id<RACSubscriber> subscriber) {
        NSDictionary *param = @{@"phoneNumber"  :phone,
                                @"password"  :pwd,
                                @"code"  :code,
                                @"strTime"  :time,};
        
        
       [RequestOperationManager forgetPwdWithParametersDic:param success:^(NSDictionary *result) {
           
           NSLog(@"忘记密码：%@",result);
           
           [subscriber sendNext:result];
           [subscriber sendCompleted];
           
       } failture:^(id result) {
           
           [subscriber sendError:result];
       }];
        
        
        return nil;
    }];
}
@end
